import random
from enum import Enum

jt_urls = [
    "http://3.cn/10-dLXF6M",
     "http://3.cn/10dQU-fmh",
     "http://3.cn/1-0dQUjk0",
     "http://3.cn/10dQ-TWOe",
     "http://3.cn/1-0dMllOw",
     "http://3.cn/10dQP-C5N"
]

jr_urls = [
    "http://3.cn/10dB-VB8k",
    "http://3.cn/10-d6yGh8",
    "http://3.cn/10-bJkcnX",
    "http://3.cn/-10bJre1t",
    "http://3.cn/10-doUjbW"
]


class Loan_URL(Enum):
    微助手 = "http://3.cn/10dB-VB8k"
    金条 = "http://3.cn/10-dLXF6M"


# def get_url_by_user_pool(name):
#     for loan_url in Loan_URL:
#         if loan_url.name == name:
#             return loan_url.value


def get_url_by_user_pool(name):
    if name == "金条":
        url = random.choice(jt_urls)
    elif name == "微助手":
        url = random.choice(jr_urls)
    else:
        url = "http://3.cn/10dB-VB8k"
    return url


if __name__ == '__main__':
    url = random.choice(jr_urls)
    print(url)

